![]() If you are a programmer you might be interested in the sources. Included is a DLL library (released under the GNU Lesser General Public License) containing all the defragger subroutines, which you can call from just about any programming language (for example Delphi and Visual Basic).
|
I have set up a forum for JkDefrag, a place where you can ask questions, give feedback about features you would like, share your experiences, share code that uses the defragger library, and other things about JkDefrag.
|
There is no "setup" or "install" and no configuration file. All you have to do is download the zip and unpack. It contains the following 3 programs:
![]() Snapshot of JkDefrag in action. The program is completely automatic, there are no buttons and no pull-down menu's.
|
JkDefrag is completely automatic. |
For example: | JkDefrag.exe -a 7 -d 2 -q c: d: | |||
-a N |
Select an action to perform. The number N is a value from 1 to 11, default is 3: 1 = Analyze only, do not fixup and do not optimize. 2 = Analyze and fixup, do not optimize. 3 = Analyze, fixup, and fast optimization (default). 5 = Analyze and force together. 6 = Analyze and move to end of disk. 7 = Analyze and sort files by name (folder + filename). 8 = Analyze and sort files by size (smallest first). 9 = Analyze and sort files by last access (newest first). 10 = Analyze and sort files by last change (oldest first). 11 = Analyze and sort files by creation time (oldest first). |
|||
-e "mask" |
Exclude files and/or directories that match the mask. The items will not be
defragged and will not be moved.
Use wildcards '*' and '?' in the mask to match a set of files or directories.
If the mask contains a space then it must be enclosed in double-quotes.
Some examples:
|
|||
-u "mask" |
Files that match a mask will be moved to the SpaceHogs area.
The program has a build-in list
for all files bigger than 50 megabytes, files not accessed in the last month,
archives, files in the recycler bin,
service pack files, and some others. Disable this list by specifying the special
mask "DisableDefaults".
Use wildcards '*' and '?' in the mask to match a set of files or directories.
If the mask contains a space then it must be enclosed in double-quotes.
Some examples:
|
|||
-s N | Slow down to N percent (1...100) of normal speed. Default is 100. | |||
-f N | Set the size of the free spaces to N percent (0...100) of the size of the volume. The free spaces are room on disk for temporary files. There are 2 free spaces, between the 3 zones (directories, regular files, space hogs). Default is 1% (per free space). | |||
-d N |
Select a debug level, controlling the messages that will be written to the logfile.
The number N is a value from 0 to 6, default is 1: 0 = Fatal errors. 1 = Warning messages [default]. 2 = General progress messages. 3 = Detailed progress messages. 4 = Detailed file information. 5 = Detailed gap-filling messages. 6 = Detailed gap-finding messages. |
|||
-l "filename" | Specify a filename for the logfile. Default is "JkDefrag.log" and "JkDefragCmd.log". Specify empty string "" (two double-quotes) to disable the logfile. | |||
-h | [commandline version only] Show a short help text. | |||
-help | [commandline version only] Show a short help text. | |||
--help | [commandline version only] Show a short help text. | |||
/? | [commandline version only] Show a short help text. | |||
-q | [windows version only] Quit the program when it has finished. | |||
items |
The items to be defragmented and optimized, such as a file, directory,
disk, mountpoint, or volume, including removable media such as
floppies, USB disks, memory sticks, and other volumes that behave
like a harddisk.
Wildcards '*' and '?' are allowed to select a set of files.
If the item contains a space then it must be enclosed in double-quotes.
The last character in a name should never be a backslash.
Some examples:
|
Tip: Cleanup old junk from your harddisk before running JkDefrag.
Tip: Reboot before running JkDefrag. This will release files that are in use, so they can be defragged.
Tip: Stop your realtime virus scanner before running JkDefrag. Virus scanners check all disk activity, making defragmentation and optimization very slow.
Tip: Move the swapfile to another volume, reboot, defragment, and move the swapfile back. If you don't have a second volume then temporarily make the swapfile small, for example 100Mb.
Tip: If an application (for example a database) prevents certain files from being defragged then stop the application, run JkDefrag for the particular data directory only, and restart the application.
|
JkDefrag is based on the standard Defragmentation Interface by Microsoft (the FSCTL_GET_VOLUME_BITMAP, FSCTL_GET_RETRIEVAL_POINTERS, and FSCTL_MOVE_FILE function calls), just like all other defragmentors. It is therefore very solid, there is no risk of losing data or the disk getting scrambled, and you can run it while the computer is in full use.
|
|
JkDefrag was designed to be fully automatic and is extremely easy to use. Most users can use the program as-is. The GUI wrappers described below can be useful if you have special requirements, they are easier to use than the commandline options.
|
|